﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace GroupChat2013.Plugins
{
    /// <summary>
    /// WinAPI工具类
    /// </summary>
    public class WinAPI
    {
        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        /// <summary>
        /// 设置前台窗体
        /// </summary>
        public static extern bool SetForegroundWindow(IntPtr hWnd);

        [DllImport("user32.dll", EntryPoint = "SetActiveWindow")]
        /// <summary>
        /// 设置活动窗体
        /// </summary>
        public static extern IntPtr SetActiveWindow(IntPtr hWnd);
    }
}
